import Cookies from "js-cookie";
import {ref} from "vue";

const TokenKey = 'TokenKey_token_sport'

export function getToken() {
    return Cookies.get(TokenKey)
}

export function setToken(token: string) {
    return Cookies.set(TokenKey, token)
}

export function removeToken() {
    return Cookies.remove(TokenKey)
}

const RefreshKey = 'RefreshKey_token_sport'

export function getRefreshToken() {
    return Cookies.get(RefreshKey)
}

export function setRefreshToken(refreshToken: string) {
    return Cookies.set(RefreshKey, refreshToken)
}

export function removeRefreshToken() {
    return Cookies.remove(RefreshKey)
}




const RoleKey = 'RoleKey_sport'

export function getRole() {
    return Cookies.get(RoleKey)
}

export function setRole(role: string) {
    return Cookies.set(RoleKey, role)
}

export function removeRole() {
    return Cookies.remove(RoleKey)
}

export const API_key="c2fdd98aeec581a992bc9ef465d389f8"


